<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="sysDefault" />
<script type="text/javascript"> 
	
 	$(document).ready(function(){
 		parent.document.getElementById("versionFrame").height=document.body.scrollHeight; 
	}); 
	
	function funform(url,target){
		window.open(url,target);
	}
	
	function tr_onclick(id,navId){  
		 var url=$("#"+id+"url").text();
		//window.open("${contextPath}/"+url+"/"+id+"/view"); 
		 parent.location.href="${contextPath}/"+url+"/"+id+"/view?navId="+navId; 
	}
</script>
</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-xs-14">
				<div class="panel panel-default"> 
				  	<tags:message content="${message}"/> 
					 <table class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
								 <th>合同号</th>
							    <th>合同名称</th>
							    <th>合同属性</th>
								<th>历史版本号</th>
								<th>创建人</th>
								<th>创建时间</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${list}" var="assContract">
							 	<tr onclick="tr_onclick('${assContract.id}','${navId}')" style="cursor:pointer">
							 			<td>${assContract.contractNo}</td>
									    <td>${assContract.subject}</td>
									     <td><ossp:value dictType="CONTRATC_ATTRIBUTE" key="${assContract.contractAttribute}"></ossp:value></td>
										<td>${assContract.versionId}.${assContract.assistId}</td>  
										<td>${assContract.createBy}</td>  
										<td>
											<fmt:formatDate value="${assContract.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/> 
											<span style="display: none" id="${assContract.id}url">${assContract.versionUrl}</span>
										</td>  
									</tr> 
							</c:forEach>
						</tbody>
					</table>  
				</div>			
			</div>
		</div>
	</div>
</body>
</html>